{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github"
      },
      "source": [
        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/gaussian-splatting-colab/blob/main/gaussian_splatting_colab.ipynb)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "VjYy0F2gZIPR"
      },
      "outputs": [],
      "source": [
        "%cd /content\n",
        "!git clone --recursive https://github.com/camenduru/gaussian-splatting\n",
        "!pip install -q plyfile\n",
        "\n",
        "%cd /content/gaussian-splatting\n",
        "!pip install -q /content/gaussian-splatting/submodules/diff-gaussian-rasterization\n",
        "!pip install -q /content/gaussian-splatting/submodules/simple-knn\n",
        "\n",
        "!wget https://huggingface.co/camenduru/gaussian-splatting/resolve/main/tandt_db.zip\n",
        "!unzip tandt_db.zip\n",
        "\n",
        "!python train.py -s /content/gaussian-splatting/tandt/train\n",
        "\n",
        "# !wget https://huggingface.co/camenduru/gaussian-splatting/resolve/main/GaussianViewTest.zip\n",
        "# !unzip GaussianViewTest.zip\n",
        "# !python render.py -m /content/gaussian-splatting/GaussianViewTest/model\n",
        "# !ffmpeg -framerate 3 -i /content/gaussian-splatting/GaussianViewTest/model/train/ours_30000/renders/%05d.png -vf \"pad=ceil(iw/2)*2:ceil(ih/2)*2\" -c:v libx264 -r 3 -pix_fmt yuv420p /content/renders.mp4\n",
        "# !ffmpeg -framerate 3 -i /content/gaussian-splatting/GaussianViewTest/model/train/ours_30000/gt/%05d.png -vf \"pad=ceil(iw/2)*2:ceil(ih/2)*2\" -c:v libx264 -r 3 -pix_fmt yuv420p /content/gt.mp4 -y"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
